Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 1 | Features | 0 |
1 | function getTimeRemaining(endtime) { |
||
16 | function initializeClock(id, endtime) { |
||
17 | var clock = document.getElementById(id); |
||
18 | var daysSpan = clock.querySelector('.days'); |
||
19 | var hoursSpan = clock.querySelector('.hours'); |
||
20 | var minutesSpan = clock.querySelector('.minutes'); |
||
21 | var secondsSpan = clock.querySelector('.seconds'); |
||
22 | |||
23 | function updateClock() { |
||
24 | var t = getTimeRemaining(endtime); |
||
25 | |||
26 | daysSpan.innerHTML = t.days; |
||
27 | hoursSpan.innerHTML = ('0' + t.hours).slice(-2); |
||
28 | minutesSpan.innerHTML = ('0' + t.minutes).slice(-2); |
||
29 | secondsSpan.innerHTML = ('0' + t.seconds).slice(-2); |
||
30 | |||
31 | if (t.total <= 0) { |
||
32 | clearInterval(timeinterval); |
||
33 | } |
||
34 | } |
||
35 | |||
36 | updateClock(); |
||
37 | var timeinterval = setInterval(updateClock, 1000); |
||
38 | } |
||
39 | |||
42 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.